summaryrefslogtreecommitdiff
path: root/app/[lng]/evcp/(evcp)/information/page.tsx
blob: 4027ab8ae06215982c6d73eb86ba3e330998028b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import * as React from "react"
import type { Metadata } from "next"
import { unstable_noStore as noStore } from "next/cache"

import { Shell } from "@/components/shell"
import { getInformationLists } from "@/lib/information/service"
import { InformationTable } from "@/lib/information/table/information-table"
import { searchParamsInformationCache } from "@/lib/information/validations"
import type { SearchParams } from "@/types/table"
import { InformationButton } from "@/components/information/information-button"

export const metadata: Metadata = {
  title: "인포메이션 관리",
  description: "페이지별 도움말 및 첨부파일을 관리합니다.",
}

interface InformationPageProps {
  searchParams: Promise<SearchParams>
}

export default async function InformationPage({ searchParams }: InformationPageProps) {
  noStore()

  const search = await searchParamsInformationCache.parse(await searchParams)

  const informationPromise = getInformationLists(search)

  return (
    <Shell className="gap-2">
      <div className="flex items-center justify-between space-y-2">
        <div className="flex items-center justify-between space-y-2">
          <div>
            <div className="flex items-center gap-2">
              <h2 className="text-2xl font-bold tracking-tight">
                도움말 관리
              </h2>
              <InformationButton pageCode="evcp/information" />
            </div>
          </div>
        </div>
      </div>
      <InformationTable promises={informationPromise} />
    </Shell>
  )
}